| Conditions | 2 |
| Total Lines | 10 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { Inject } from '@nestjs/common'; |
||
| 14 | |||
| 15 | public async execute(query: GetTasksQuery): Promise<Pagination<TaskView>> { |
||
| 16 | const taskViews: TaskView[] = []; |
||
| 17 | const [tasks, total] = await this.taskRepository.findTasks(query.page); |
||
| 18 | |||
| 19 | for (const task of tasks) { |
||
| 20 | taskViews.push(new TaskView(task.getId(), task.getName())); |
||
| 21 | } |
||
| 22 | |||
| 23 | return new Pagination<TaskView>(taskViews, total); |
||
| 24 | } |
||
| 26 |